package com.endoc.designpattern.observer;

/**
 * 芒果观察者
 */
public class MangoObserver implements Observer {
    String name;

    public MangoObserver(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void update() {
        System.out.println(name+"收到芒果到货的通知了");
    }
}
